The present invention relates generally to the field of indexing data, and more particularly to suspending a database index in a data processing system.
Computer databases allow the storage of digital data in an organized format that allows searches to retrieve a particular subset of data utilizing specialized commands in a query language, such as Structured Query Language (SQL). SQL enables data entry, manipulation, and deletion within database tables. Client applications may generate SQL statements based on user input. Stored database procedures may include SQL statements, which run either on a schedule or on request by a Database Administrator (DBA). The SQL is executed by a Database Management System (DBMS), which is a software system designed to control access and allow administration of a database. A query describes the data being requested from the database, but does not define the best path for retrieving that data from the database. A query optimizer defines the most efficient way to execute a given query within a database system.
In a database environment, the query optimizer utilizes database indices to determine the best path for a DBMS to access specific data in a database table. Indices enable a query to locate data quickly without having to search entire rows of a database table. A database index is a data structure that improves the speed of data retrieval operations on a database table by storing a copy of one or more selected columns of data from a table along with a pointer back to the complete row of data from which the column item was copied. Some indices are for special use and, as such, only create entries for records satisfying a selected condition, function, or expression, for example, indices created for a specific customer. In some cases, databases may have multiple indices covering a single database table. Each index is stored as a separate searchable entity from the data in the database tables. The DBMS maintains each index by incrementally updating the index as information is inserted into, removed from, and updated in the rows of the database tables. When processing large volumes of updates to a database, the DBA may manually delete an index, and then rebuild the index at the end of processing rather than performing the incremental updates during the large volume load.